When exporting to Word from a view in doors I want to capture the baseline applied. If the baseline in the view is not the most recent how would I get a handle on the baseline? For example if I am viewing baseline 1.1 but the most recent is 1.5 I need a handle on 1.1 to use the dateOf function. Additionally this has to be general so I can't simply create Baseline b = baseline(1,1,null) In essence I need a handle on the Module version in order to get the date the baseline was created. For example: |
Re: display dateOf baseline in current view of the module for variable baseline
Not sure if I understood you correctly.
Date d
Module m = current
if (baseline (m)) {
// m is a baseline. Print the date when it was created
d = dateOf (baselineInfo(m))
} else {
// m is current version. Print the date when the last baseline was created
d = dateOf (getMostRecentBaseline(m))
}
print d
|
Re: display dateOf baseline in current view of the module for variable baseline You can cheat and use History. If you open a baseline and look at Module Properties >History tab, you see the 1st History in the module is the one that performed the Baseline.
History hst = null
HistoryType ht = null
for hst in (current Module) do {break} // stop after 1 History
if (null hst) then Louie is Wrong
ht = hst.type
if (ht != baselineModule) then Louie is Wrong
Date datBaseline = hst.date
|
Re: display dateOf baseline in current view of the module for variable baseline llandale - Thu Jan 31 11:20:38 EST 2013 You can cheat and use History. If you open a baseline and look at Module Properties >History tab, you see the 1st History in the module is the one that performed the Baseline.
History hst = null
HistoryType ht = null
for hst in (current Module) do {break} // stop after 1 History
if (null hst) then Louie is Wrong
ht = hst.type
if (ht != baselineModule) then Louie is Wrong
Date datBaseline = hst.date
|
Re: display dateOf baseline in current view of the module for variable baseline llandale - Thu Jan 31 11:28:17 EST 2013
|
Re: display dateOf baseline in current view of the module for variable baseline SystemAdmin - Thu Jan 31 12:08:43 EST 2013 bool isBaseline(Module) |
Re: display dateOf baseline in current view of the module for variable baseline llandale - Thu Jan 31 14:06:57 EST 2013 |
Re: display dateOf baseline in current view of the module for variable baseline SystemAdmin - Thu Jan 31 15:30:45 EST 2013 isBaseline(Module) tells you if THIS open module is a baseline. false means it is the current module. if (isBaseline(module(obj))) // then display "baseline" else display "current" Views are not baselined. If you baseline a module then delete a view; that view is not available to any baseline.
if (isDeleted(obj)) BackColor = realColor_Black // Black: Deleted (saved) elseif(unsaved(obj) or new(obj)) BackColor = realColor_Red // Red: Changed not yet saved elseif(saved(obj)) BackColor = realColor_Yellow // Yellow: modified since Baseline or module create else
|
Re: display dateOf baseline in current view of the module for variable baseline llandale - Thu Jan 31 16:07:11 EST 2013 isBaseline(Module) tells you if THIS open module is a baseline. false means it is the current module. if (isBaseline(module(obj))) // then display "baseline" else display "current" Views are not baselined. If you baseline a module then delete a view; that view is not available to any baseline.
if (isDeleted(obj)) BackColor = realColor_Black // Black: Deleted (saved) elseif(unsaved(obj) or new(obj)) BackColor = realColor_Red // Red: Changed not yet saved elseif(saved(obj)) BackColor = realColor_Yellow // Yellow: modified since Baseline or module create else
You are right sorry I misunderstood before, thank you for your great help. |
Re: display dateOf baseline in current view of the module for variable baseline //Hope it helps Module m = current Module
if(baselineIndex(m)=="1000000") //1000000 is default value if it not baselined before, colour indication won't help.
print "Not Baselined"
print "Baselined->"
print dateOf (getMostRecentBaseline(m)) "\n" |